package com.ali.gts.service.impl;

import com.ali.gts.domain.Emp;
import com.ali.gts.mapper.EmpMapper;
import com.ali.gts.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class EmpServiceImpl implements EmpService {

    @Autowired(required = false)
    private EmpMapper empMapper;

    @Override
    public Emp getEmpAndDep(Integer eid) {
        return empMapper.getEmpAndDepByStepOne(eid);
    }

    @Override
    public List<Emp> getAllEmpByDid(Integer did) {
        return empMapper.getDeptAndEmpByStepTwo(did);
    }

    @Override
    public int insertEmp(Map map) {
        return empMapper.insertEmp(map);
    }
}
